
package Global;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author Raed Shomali
 */
public class Methods 
{
    /*
     * Taken from http://www.devx.com/tips/Tip/28334
     */
    public static boolean isValidEmailAddress( String email )
    {
        //Set the email pattern string
        Pattern p = Pattern.compile( ".+@.+\\.[a-z]+" );

        //Match the given string with the pattern
        Matcher m = p.matcher( email );

        //check whether match is found
        return m.matches();
    }
}
